<%@page import="java.util.ArrayList"%>
<%@page import="javax.cache.CacheException"%>
<%@page import="java.util.Collections"%>
<%@page import="javax.cache.CacheManager"%>
<%@page import="javax.cache.Cache"%>
<%@page import="models.Domain"%>
<%
Domain domain = (Domain) request.getAttribute("domain");
String name = (String) request.getAttribute("name");
String title = "DNS tools";
String des = "Check your DNS registration, delegation, DNS, Mail and Web Servers. Get a full report, free!";
String key = "dns, check dns,dns tool";
if(name!=null)
{
	title = "DNS "+name;
	des= title+" ,Check your DNS registration, delegation, DNS, Mail and Web Servers. Get a full report, free! ."+name;
	key=name+",dns, check dns,dns tool";
}
Cache caches=null; 
try {
    caches = CacheManager.getInstance().getCacheFactory().createCache(Collections.emptyMap());
} catch (CacheException e) {
   e.printStackTrace();
   
}
ArrayList<String> view = null;
if(caches.containsKey("view"))
{
	view = (ArrayList<String>) caches.get("view");
}
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title><%=title %></title>
<meta name="description" content="<%=des %>" />
<meta name="keywords" content="<%=key %>" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
<style type="text/css">
<!--
a:link {
	color: #3183B2;
}

a:visited {
	color: #3183B2;
}

a:hover {
	color: #000000;
}

a:active {
	color: #333333;
}
#whois-reginfo .def{
width: 150px;
}
body,td,th {
	font-family: Arial, Helvetica, sans-serif;
	color: #5F5F5F;
}

h1 {
	color: 666666;
}

h2 {
	color: 666666;
}

h3 {
	color: 666666;
}

h4 {
	color: 666666;
}

h5 {
	color: 666666;
}

h6 {
	color: 666666;
}
-->
</style>
</head>
<body>
	<br />
	<br />
	<br />
	<p align="center">
		<a href="/" title="whois"><img
			src="/images/logo.png" alt="whois Tool Online" border="0">
		</a>

	</p>
	<center>
		<form name="related" method="get" action="/search">
			<table width="615" BORDER="0" align="center" CELLPADDING="2"
				class=normal id="table1">
				<tr>
					<th width="71%" scope="col" abbr="Keyword Synonyms Tool"><div
							align="left">
							<p>
								<input name="name" type="text" id="domain" value="<%=name!=null?name:"google.com" %>"
									size="60" maxlength="99"
									onclick="document.related.domain.value ='';"> 
									
								<input type="submit" name="Submit"
									value="DNS">	
								<span
									class="alt">  <br> Use ontar to Lookup dns a Domain<br>
								</span>
							</p>
						</div>
					</th>
				</tr>
			</table>
		</form>
	</center>
	
	<table width="745" align="center">
		<%
		if(name!=null)
		{
		%>
		<tr>
			<td colspan="2"><h1>DNS <%=name %></h1></td>
		</tr>
		<tr>
			<td colspan="2"><%=domain.getWhois()!=null?domain.getWhois().getValue():"No DNS" %></td>
		</tr>
		<tr>
			<td colspan="2"><h2>Find information about <a target="_blank" href="http://www.lizbon.org/site/<%=name%>"><%=name%></a> on lizbon.org</h2></td>
		</tr>
		
		<%
		if(!domain.getOtherDomain().equals(""))
		{
		%>
		<tr>
			<td width="150">Other domain</td>
			<td>
				<%
					String[] oth = domain.getOtherDomain().split(",");
					for(int i=0;i<oth.length;i++)
					{
						out.print("<a href=\"/dns/"+oth[i]+"\">"+oth[i]+"</a>, ");
					}
				%>
			</td>
		</tr>
		<%
		}
		%>
		
		<%
		} else {
		%>
		<tr>
			<td colspan='2'>Check your DNS registration, delegation, DNS, Mail and Web Servers. Get a full report, free!</td>
		</tr>
		<tr>
			<td width="150"><h4>Recent site view</h4></td>
			<td>
				<%
				if(view!=null)
				{
					for(int j=0;j<view.size();j++)
					{
					%>
						<a href="/dns/<%=view.get(j) %>"><%=view.get(j) %></a>, 
					<%
						if(j==18)
							break;
					}
				}
				%>
			</td>
		</tr>
		<%
		}
		%>
	</table>
	<br />

	<br />
	<br />
	<p align="center">
		<a href="/">&copy; 2012 ontar.net</a> | 
		<a href='http://www.lizbon.org' target='_blank'>about domain</a> |
		<a href='http://www.rodderboy.com' target='_blank'>Check whois</a> |   
		<a class="addthis_button"
			href="http://www.addthis.com/bookmark.php?v=250&amp;pub=ra-4d6f3cdb1d190d60"><img
			src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125"
			height="16" alt="Bookmark and Share" style="border: 0" />
		</a>
		<script type="text/javascript"
			src="http://s7.addthis.com/js/250/addthis_widget.js?pub=xa-4abc324b311cfb79"></script>
	</p>

	<center></center>
</body>
</html>